package java_1_6;

import java_1_6.Animal;

public class Dog extends Animal {
    public Dog(String name,int age){
        //调用父类的有参构造，若父类中没有无参构造，必须在子类中通过super显示调用父类的有参构造
        super(name, age);
    }
    public void eat(String food){
        System.out.println("狗狗"+this.name+"正在吃"+food);
    }
    public static void test(){
        System.out.println("dog's test");
    }
}
